<?php
session_start();
set_include_path(get_include_path() . PATH_SEPARATOR . '.' . PATH_SEPARATOR . './libs/');
require_once('./libs/Smarty/Smarty.class.php');
require_once('./libs/classes/dbconection.class.php');
require_once('./libs/classes/articleModel.class.php');
require_once('./libs/classes/commentModel.class.php');
require_once('./libs/classes/quzhuanyi.fun.php');
$ls = new Smarty();
$doit = new Articleop();
$wantlog = $doit->findA($_GET['id']);
$wantlog=stripslashesx($wantlog);
$ls->assign('wantlog',$wantlog);
$otherlogs = $doit->selectS($_GET['id'],$wantlog['article_uid'],7);
$otherlogs=stripslashesx($otherlogs);
$ls->assign('otherlogs',$otherlogs);
$dbLink=dbconection::makealink();
$userinfomation = $dbLink->fetchRow("select * from user where user_id='{$wantlog['article_uid']}'");
$zuozheinfo = array('name'=>$userinfomation['user_name'],
									'age'=>$userinfomation['user_age'],
									'info'=>$userinfomation['user_info']);
$ls->assign('info',$zuozheinfo);
$abc = new CommentModel();
$comments = $abc->findpinglun($wantlog['article_id']);	
$ls->assign('comments',$comments);
$ls->assign('back',$userinfomation['user_login']);
if(isset($_SESSION['userinfo']))
{
	$ls->display('alogm.html');
}else
{
	$ls->display('alog.html');
}

?>